package com.orz.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Fetch;


@Entity
@Table(name = "chathistory", catalog = "demo")
public class Chathistory implements java.io.Serializable {

	// Fields

	private Integer userid;
	private String chatvalue;
	private Date chattime;

	// Constructors

	/** default constructor */
	public Chathistory() {
	}

	/** full constructor */
	public Chathistory(String chatvalue, Date chattime) {
		this.chatvalue = chatvalue;
		this.chattime = chattime;
	}
	
	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "USERID", unique = true, nullable = false)
	public Integer getUserid() {
		return this.userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	@Column(name = "CHATVALUE", nullable = false, length = 200 )
	public String getChatvalue() {
		return this.chatvalue;
	}

	public void setChatvalue(String chatvalue) {
		this.chatvalue = chatvalue;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CHATTIME", nullable = false, length = 10)
	public Date getChattime() {
		return this.chattime;
	}

	public void setChattime(Date chattime) {
		this.chattime = chattime;
	}

}